package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `gorm:"type:Char(11)" json:"tel"`
	Password string `gorm:"type:varchar(50)" json:"password"`
}

type News struct {
	gorm.Model
	Title   string `gorm:"type:varchar(40)" json:"title"`
	Content string `gorm:"type:text" json:"content"`
	Img     string `gorm:"type:varchar(255)" json:"img"`
	UserID  int    `gorm:"type:int" json:"user_id"`
	User    User   `gorm:"foreignKey:UserID" json:"user"`
}
